import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Date;
public class C {
	public static void main (String args[]) {
		Connection con=null;
		Statement sql;
		ResultSet rs;
		con=GetDBConnection.connectDB("student", "root","111111");
		if(con == null) return;
		String jiLu="('16012000','张三','2003-03-24','1.6'),"+
				    "('16012001','李四','2003-03-22','1.7')";
		String sqlStr="insert into mess values"+jiLu;
		try {
			sql = con.createStatement();
			int ok = sql.executeUpdate(sqlStr);
			rs =sql.executeQuery("select * from mess");
			while (rs.next()){
				    String number = rs.getString(1);
				    String name = rs.getString(2);
				    Date date = rs.getDate(3);
			        float height = rs.getFloat(4);
			        System.out.print(number);
			        System.out.print(name);
				    System.out.print(date);
			        System.out.println(height);
			}
			con.close();
		}
		catch (SQLException e){
			System.out.println("纪录中number值不能重复"+e);
		}
	}

}

